package org.lucene.automatonPlay;

import org.apache.lucene.util.automaton.Automaton;
import org.apache.lucene.util.automaton.BasicAutomata;
import org.apache.lucene.util.automaton.BasicOperations;

public class BaseOpera {
	public static void main(String[] args) {
		Automaton singleton = BasicAutomata.makeString("prefix");
		Automaton expandedSingleton = singleton.complement();
		Automaton other = BasicAutomata.makeCharRange('5', '7');
		Automaton concat = BasicOperations.concatenate(singleton, other);
		System.out.println(concat.isDeterministic());
		System.out.println(BasicOperations.sameLanguage(BasicOperations.concatenate(expandedSingleton, other), concat));
	}
}
